<%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="houtai_mainhead.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="statics/css/manage.css" type="text/css"></link>
<script src="statics/js/usermanage.js"></script>
<title>Insert title here</title>

</head>
<body>
<body>
<div class="handler">
	<form method="post">
		<input class="searchput" type="text" name="tel" placeholder="姓名/电话查询">
		<button class="search">查询</button>
		</form>
		<button class="blueadd" onclick="adminshow()">+添加</button>
		</div>
		<table>
			<thead>
				<tr height="50px">
					<th><input type="checkbox" onchange="checkAll(this)"></th>
					<th>名称</th>
					<th>用户名</th>
					<th>角色</th>
					<th>电话</th>
					<th>性别</th>
					<th>操作</th>
				</tr>
			</thead>

			<tbody>

				<c:forEach items="${admin_he}" var="admin">
					<tr>
						<td><input type="checkbox" onchange="check()"></td>
						<td>${admin.aname}</td>
						<td>${admin.anickname}</td>
						<td class="arname">${admin.ar_name}</td>
						<td>${admin.atel}</td>
						<td class="asex">${admin.asex}</td>
						<td>
							<div class="caozuo">
								<a class="red change" onclick="adminmodify(this)" data-id=${admin.aid }>修改</a>
								<a class="blue" onclick="singledelete(1,this)" data-id="${admin.aid}">删除</a>
							</div>
						</td>

					</tr>

				</c:forEach>
			</tbody>
		</table>

	


	<div id="adminadd" style="display:none;padding:15px;text-align:left;margin-left:30px">
		<form action="admintianjia" method="post" onSubmit="return myCheck(this)">
			<!-- <a class="x" onclick="tanchu(0,2)"><img width="40px"
				height="30px" src="statics/image/yqs/close.png"></a> -->
				<div>
					姓名: <input type="text" name="aname">
				</div>
				<div>
					昵称: <input type="text" name="anickname">
				</div>
				<div>
					密码: <input type="text" name="apassword" />
				</div>
				<tr>
					<th>状态: </th>
					<td>
						<select name="arname">
							<c:forEach items="${adminrole}" var="ar">
								<option >${ar.ar_name} </option>
							</c:forEach>
						</select>
					</td>
				</tr>
				<div>
					电话: <input type="text" name="atel">
				</div>
				<div>
					性别: <select name="asex">
							<option>男</option>
							<option>女</option>
			        		<option>未知</option>
						</select>
				</div>
				<div>
					<input type="hidden" name="aid" value="">
						<button class="btn">确定</button>
				</div>
		</form>
	</div>


	<div id="modify" style="display:none;padding:20px;text-align: center">
		<form action="adminmodify" method="post" onSubmit="return myCheck(this)">
			<!-- <a class="x" onclick="tanchu(0,2)"><img width="40px"
				height="30px" src="statics/image/yqs/close.png"></a> -->
				<div>
					姓名: <input type="text" name="aname">
				</div>
				<div>
					昵称: <input type="text" name="anickname">
				</div>
				<div>
					密码: <input type="text" name="apassword" />
				</div>
				<tr>
					<th>状态: </th>
					<td>
						<select name="arname">
							<c:forEach items="${adminrole}" var="ar">
								<option >${ar.ar_name}
								</option>
							</c:forEach>
						</select>
					</td>
				</tr>
				<div>
					电话: <input type="text" name="atel">
				</div>
				<div>
					性别: <select name="asex">
							<option>男</option>
							<option>女</option>
			        		<option>未知</option>
						</select>
				</div>
				<div>
					<input type="hidden" name="aid" value="">
						<button class="btn">确定</button>
				</div>
		</form>
	</div>


	<div id="temp"></div>

</body>
</html>